package com.qf.osmarea.controller;

import com.qf.common.core.annotation.NoLogin;
import com.qf.common.core.common.R;
import com.qf.osmarea.param.FavParam;
import com.qf.osmarea.service.FavoriteService;
import com.qf.osmarea.vo.FavoriteVO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Qu Xiaotong
 * @data 2025/6/12
 * @desc
 */
@RestController
@RequestMapping("/area/favorite")
public class FavoriteController {

    @Resource
    private FavoriteService favoriteService;

    @RequestMapping("/getFav")
    public R getFav(FavParam favParam){
        List<FavoriteVO> favorites = favoriteService.getFavorites(favParam);

        return R.ok(favorites);
    }

}